<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.7.0/jquery.js"></script>
</head>
<body>
    <h1>  Jquery Ajax</h1>
    <script>
    let path = 'https://autumnfish.cn/api/joke/list?num=3'

    $.ajax({
        url: path,
        success: function(ret){
            // ret = json对象
            for(let s of ret.data ){
                let p = "<p>"+s+"</p>"
                $('body').append(p)
            }
        }
    })

    </script>
</body>
</html>